package com.woniuxy.purchasemanager.controller;

import com.woniuxy.commons.entity.purchaseManager.GoodsEntity;
import com.woniuxy.commons.entity.purchaseManager.ProductEntity;
import com.woniuxy.commons.result.Result;
import com.woniuxy.purchasemanager.service.ProductService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author:黄志超
 * @Todo:TODO
 * @DateTime:2022/4/24 19:31
 * @Component:蜗牛
 **/
@RestController
@RequestMapping("/need/needgoods")
public class GoodsController {

    @Resource
    private ProductService productService;
    @GetMapping("/goodsList")
    public Result goodsList(){
        List<GoodsEntity> goodsEntities = productService.selectFindGoods();
        return  Result.ok(goodsEntities);
    }
}
